<?php

function get_infos($cook) {
  $cook = clear($cook);
  $members = mysql_query('SELECT * FROM members');

  while ($row = mysql_fetch_assoc($members)) {
    $login = $row['login'];
    $pwd = $row['pwd'];
    $act = $row['active'];
    $id = $row['id'];
    $size = strlen($login);
    if ($cook == md5($size . $login . $pwd))
      $infos = array('login' => $login, 'active' => $act, 'id' => $id);
  }

  if ($infos['login'] == NULL)
    return FALSE;
  else
    return $infos;
  }

?>